package com.hmsproject.datastructures.comparators;

import java.util.Comparator;

import com.hmsproject.datastructures.deal.Criterion;

public class CriterionComparator implements Comparator<Criterion> {
	
	private static CriterionComparator criterionComparator = new CriterionComparator();

	@Override
	public int compare(Criterion criterion1, Criterion criterion2) {
		return criterion1.getAdditionalPercentOff()-criterion2.getAdditionalPercentOff();
	}
	
	private CriterionComparator(){
		
	}
	
	public static CriterionComparator getInstance(){
		return criterionComparator;
	}		

}
